package com.example.provider.interceptor;

import com.smart.thrift.base.Invocation;
import com.smart.thrift.base.ThriftInterceptor;
import org.springframework.stereotype.Component;

@Component
public class TestInterceptor implements ThriftInterceptor {

    @Override
    public Integer getOrder() {
        return 1;
    }

    @Override
    public boolean preHandle(Invocation invocation) {
        String tenantId = invocation.getAttachment("tenantId");
        System.out.println("==========="+tenantId);
        return true;
    }
}
